package cn.lonecloud.service.impl;

import java.util.List;

import cn.lonecloud.dao.ProductDao;
import cn.lonecloud.dao.impl.ProductDaoImpl;
import cn.lonecloud.model.Product;
import cn.lonecloud.service.ProductService;

public class ProductServiceImpl implements ProductService {

	ProductDao productDao = new ProductDaoImpl();

	@Override
	public List<Product> showAll() {
		List<Product> products = productDao.findAll();
		return products;
	}

	@Override
	public Product findById(int id) {
		return productDao.findById(id);
	}

	@Override
	public void update(Product product) {
		productDao.update(product);
	}

	@Override
	public void save(Product product) {
		productDao.save(product);
		
	}

}
